******************************************************************************************************************************************************************************************************************************************************************************************

*Setting dataset for multi-level models: Country*
xtset country

*M1 = Cohort Group variable and control variables. Testing whether support for European integration is significantly higher among political elites (H1A)*
mixed eu_int mass_elite leftright_one gov_oppo_one gallagher laakso_one size || country:, reml
estat ic
estat icc
est table, star b(%8.3f) stats(N) varwidth(40)

*M2 = Cohort Group variable, Year variable, and control variables. Testing whether pro-EU elite bias significantly increased over time (H2A)*
mixed eu_int i.mass_elite##i.year leftright_one gov_oppo_one gallagher laakso_one size || country:, reml
estat ic
estat icc
est table, star b(%8.3f) stats(N) varwidth(40)

*M2 post-estimation analysis = Cohort Group and Year. Testing whether pro-EU elite bias significantly increased over time (H2A)*
margins mass_elite, at(year = (1979 1994 1996 2000 2007 2009 2014 2016)) vsquish
marginsplot, title("Predicted Support for EU Integration by Year and Cohort") ///
    xlabel(1979 1994 1996 2000 2007 2009 2014 2016) ylabel(, angle(0)) ///
    legend(position(6) col(1))	
	
*M3 = Cohort Group variable, Euroscepticism (0-1) variable, and control variables. Testing whether support for European integration is significantly higher among political elites in both the Eurosceptic and pro-European macro-groups, dichotomic (H3A–H4A)*
mixed eu_int i.mass_elite##c.eurosc_two leftright_one gov_oppo_one gallagher laakso_one size || country:, reml
estat ic
estat icc
est table, star b(%8.3f) stats(N) varwidth(40)

*M3 post-estimation analysis = Cohort Group and Euroscepticism (0-1). Testing whether support for European integration is significantly higher among political elites in both the Eurosceptic and pro-European macro-groups, dichotomic (H3A–H4A)*
margins mass_elite, at(eurosc_two = (0 1)) vsquish
marginsplot, title("Predicted EU Integration by Cohort and Euroscepticism (0-1)") ///
    xlabel(0 "Eurosceptic" 1 "Pro-EU") ytitle("Predicted Support for EU Integration") ///
    legend(label(1 "Mass = 0") label(2 "Elite = 1"))

*M4 = Cohort Group variable, Euroscepticism (1-7) variable, and control variables. Testing whether support for European integration is significantly higher among political elites in both the Eurosceptic and pro-European macro-groups (H3A–H4A)*
mixed eu_int i.mass_elite##c.eurosc_one leftright_one gov_oppo_one gallagher laakso_one size || country:, reml
estat ic
estat icc
est table, star b(%8.3f) stats(N) varwidth(40)

*M4 post-estimation analysis = Cohort Group and Euroscepticism (1-7). Testing whether support for European integration is significantly higher among political elites in both the Eurosceptic and pro-European macro-groups (H3A–H4A)*
margins mass_elite, at(eurosc_one = (1(1)6)) vsquish
marginsplot, title("Predicted EU Integration by Cohort and Euroscepticism (1-7)") ///
    xlabel(1(1)6, format(%2.0f)) ytitle("Predicted Support for EU Integration") ///
    legend(label(1 "Mass = 0") label(2 "Elite = 1"))

	
*M5 = Cohort Group variable, Italy variable, and control variables. Testing whether support for European integration is significantly higher among political elites in Italy (H1A)*
mixed eu_int i.mass_elite##i.italy leftright_one gov_oppo_one gallagher laakso_one size || country:, reml
estat ic
estat icc
est table, star b(%8.3f) stats(N) varwidth(40)

*M5 post-estimation analysis = Cohort Group and Italy. Testing whether support for European integration is significantly higher among political elites in Italy (H1B)*
margins mass_elite, at(italy = (0 1)) vsquish
marginsplot

*M6 = Cohort Group variable, Year variable, Italy variable, and control variables. Testing whether pro-EU elite bias significantly increased over time in Italy (H2B)*
mixed eu_int i.mass_elite##i.italy##i.year leftright_one gov_oppo_one gallagher laakso_one size || country:, reml
estat ic
estat icc
est table, star b(%8.3f) stats(N) varwidth(40)

*M6 post-estimation analysis = Cohort Group, Year, and Italy. Testing whether pro-EU elite bias significantly increased over time in Italy, Other Countries (H2B)*
margins italy#mass_elite if italy==0, at(year = (1979 1994 1996 2000 2007 2009 2014 2016)) vsquish
marginsplot
	
*M6 post-estimation analysis = Cohort Group, Year, and Italy. Testing whether pro-EU elite bias significantly increased over time in Italy, Italy (H2B)*
margins italy#mass_elite if italy==1, at(year = (1979 1994 1996 2000 2007 2009 2014 2016)) vsquish
marginsplot
	
*M7 = Cohort Group variable, Euroscepticism (1-7) variable, Italy variable, and control variables. Testing whether support for European integration is significantly higher among political elites in both the Eurosceptic and pro-European macro-groups in Italy (H3B–H4B)*
mixed eu_int i.mass_elite##i.italy##c.eurosc_one leftright_one gov_oppo_one gallagher laakso_one size || country:, reml
estat ic
estat icc
est table, star b(%8.3f) stats(N) varwidth(40)

*M7 post-estimation analysis = Cohort Group, Euroscepticism (1-7), and Italy. Testing whether support for European integration is significantly higher among political elites in both the Eurosceptic and pro-European macro-groups in Italy, Other Countries (H3B–H4B)*
margins italy#mass_elite if italy==0, at(eurosc_one = (1(1)6)) vsquish
marginsplot

*M7 post-estimation analysis = Cohort Group, Euroscepticism (1-7), and Italy. Testing whether support for European integration is significantly higher among political elites in both the Eurosceptic and pro-European macro-groups in Italy, Italy (H3B–H4B)*
margins italy#mass_elite if italy==1, at(eurosc_one = (1(1)6)) vsquish
marginsplot

******************************************************************************************************************************************************************************************************************************************************************************************
